//
//  Ext+UIImageView.swift
//  BQWB
//
//  Created by laibingqiang on 16/10/25.
//  Copyright © 2016年 laibingqiang. All rights reserved.
//

import UIKit
import SDWebImage


extension UIImageView{
    
    
    convenience init(imgName:String){
        
        self.init()
        
        self.image = UIImage(named: imgName)
    }
    
    
    func bq_setImage(withURLString:String?,placeholderImage:String?){
        
        let url = URL(string: withURLString ?? "")
        
        guard let u = url else {
            
            return
        }
        
        self.sd_setImage(with: u, placeholderImage: UIImage(named:placeholderImage ?? ""))
        
    }
    
    
}
